﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class ScoreSlider : MonoBehaviour
{
    private Slider scoreSlider;

    private void Awake()
    {
        scoreSlider = GetComponent<Slider>();
    }

    private void Start()
    {
        scoreSlider.maxValue = GameManager.GetData().successScore;
    }

    // Update is called once per frame
    void Update()
    {
        scoreSlider.value = Mathf.Min(GameManager.GetData().successScore, GameManager.Instance.score);
    }
}
